<?php
namespace Manager\Model;
use Think\Model;
class BlogsModel extends  Model{
	
	/**
	 * 自动完成
	 * @var unknown
	 */
	protected $_auto= array (
			 array('title','htmlspecialchars',3,"function"),
			 array('description','htmlspecialchars',3,"function"),
			array('author_id','get_user_session',3,"callback"),
	);

/**
 * 用户登录后保存在session的用户id
 */
function get_user_session()
{
	$user=session('auth');
	return $user['id'];
}
}
	